package com.sys.servlet;

import com.sys.dao.sysDao;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(name = "getDepartmentServlet", urlPatterns = "/sys/getDepartment", description = "获取部门")
public class getDepartmentServlet extends sysServlet {
  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    setHeadHtml(req, resp, "getDepartmentServlet");
    sysDao dao = new sysDao();
    PrintWriter out = resp.getWriter();
    dao.getDepartment(out::print);
  }
}
